<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/static/js/jquery.js"></script>

    <script>
        $(function () {
            $("#bn").click(function () {
                var u = $("#u1").val();
                var p = $("#p1").val();
                if(u==""){
                    alert("账号不能为空");
                    return false;
                }
                if(p==""){
                    alert("密码不能为空");
                    return false;
                }
                return true;
            })
        })
    </script>
</head>
<body>
<form action="" method="post">
    <table align="center">
        <tr>
            <td>用户名 </td>
            <td><input type="text" name="uname" id="u1"></td>
        </tr>
        <tr>
            <td>密码 </td>
            <td><input type="password" name="pwd" id="p1"></td>
        </tr>
        <tr>
            <td><button id="bn">登录</button></td>
            <td><a href="{% url 'zhuce' %}"><input type="button" value="注册"></a></td>
        </tr>
    </table>
</form>
</body>
</html>